<!DOCTYPE html>
<html>
        <head>
        <title>Page Title</title>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
        <script type="text/javascript" src="../js/jquery.mobile.router.js"></script>
        <script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
        <script type="text/javascript">
	var router=new $.mobile.Router({
		"#localpage2(?:[?/](.*))?": "localpage2",
	},{
		localpage2: function(type,match,ui){
			console.log("localpage2: "+type);
			console.log(match);
		}
	}, { 
		defaultHandler: function(type, ui, page) {
			console.log("Default handler called due to unknown route (" 
				+ type + ", " + ui + ", " + page + ")");
		},
		defaultHandlerEvents: "s"
	});
        </script>
</head>

<body>

<div data-role="page" id="index">
        <div data-role="header">
                <h1>Index</h1>
        </div>

        <div data-role="content">
                <p>Page 1</p>
                <p>The output of this page can be seen in your javascript console. Please go to localpage2.</p>
                <p>
                        <a href="#localpage2?param=value&param2=value">#localpage2 (this one contains the demo)</a><br/>
                </p>
        </div>

        <div data-role="footer">
                <h4>Index footer</h4>
        </div>
</div>

<div data-role="page" id="localpage2" data-add-back-btn="true">
        <div data-role="header">
                <h1>Localpage 2</h1>
        </div>

        <div data-role="content">
                <p>This is the localpage 2 in the multipage template.</p>
                <p><a href="#index">Back to index</a></p>
        <a href="#localpage2?param=value2&param2=value2">#localpage2 with params v1 (self)</a><br/>
        <a href="#localpage2?foo=bar&bar=foo&foobarbaz2">#localpage2 with params v2 (self)</a><br/>
        </div>

        <div data-role="footer">
                <h4>Localpage 2 Footer</h4>
        </div>
</div>

</body>

</html>
